package com.liuyang.ecommerce.vo;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <h1>通用响应对象<h1/>
 * 为了给前端统一的响应标识
 * {
 *     "code":0,
 *     "message":"",
 *     "data":{
 *
 *     }
 * }
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CommonResponse<T> implements Serializable {
    private Integer code;
    private String message;
    private  T data;

    public CommonResponse(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
